package com.bd.scm.module.user.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bd.scm.domain.dto.user.PersonnelFilesDto;
import com.bd.scm.domain.models.user.UserVacation;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface UserVacationService {
    /**
     * 查询人员
     * @param userVacation
     * @return
     */
    List<UserVacation> vacationList(UserVacation userVacation);

    /**
     * 修改
     * @param userVacation,clientIp
     * @return
     */
    int updateJqInfo(UserVacation userVacation, String clientIp);

    int sockVacation(UserVacation userVacation, String clientIp);
    int setLimit(UserVacation userVacation, String clientIp);

    /**
     * 清零
     * @param userVacation
     * @param clientIp
     * @return
     */
    int clearingZero(UserVacation userVacation, String clientIp);
    /**
     * 清零福利年假
     * @param userVacation
     * @param clientIp
     * @return
     */
    int flClearingZero(UserVacation userVacation, String clientIp);

    int luRuVacation(UserVacation userVacation, String clientIp);


    void execTaskRuVacation();

    /**
     * 年假导入
     * @param file
     * @param request
     * @return
     */
    String upJiaQiExcel(MultipartFile file, HttpServletRequest request) throws  Exception;

    /**
     * 锁定假期导入
     * @param file
     * @param request
     * @return
     */
    String upLockVacationExcel(MultipartFile file, HttpServletRequest request) throws  Exception;
    /**
     * 调休导入
     * @param file
     * @param request
     * @return
     */
    String upBreakExcel(MultipartFile file, HttpServletRequest request) throws  Exception;

    /**
     * 计算年假  每年1月1号
     */
    void calculationVacation();

    /**
     * 查询全局保存法定年假、福利年假清0时间设置
     * @return fdNjClearDate 法定年假清0时间 flNjCleaDate 福利年假清0时间
     */
    JSONObject getfdflNjClearDate();

    /**
     * 全局保存法定年假、福利年假清0时间设置
     * @param userVacation fdNjClearDate 法定年假清0时间 flNjCleaDate 福利年假清0时间
     * @return
     */
    String updatefdflNjClearDate(UserVacation userVacation);
}
